package com.hspedu.extends_.improve_;

/**
 * @author 谷其昊
 * @version 1.0
 * @date 2022/1/20
 * @time 19:33
 * 作为pupil和graduate的父类
 */

public class Student {

    /**
     * 共有属性
     */
    public String name;
    public int age;
    private double score;

    /**
     * 共有方法
     * @param score
     */
    public void setScore(double score) {
        this.score = score;
    }

    public void showInfo() {
        System.out.println(name + "的成绩是：" + score + "，年龄为" + age);
    }

}
